<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title></title>
		<script type="text/javascript">
			window.onload = function(){
				var diaodan = document.getElementById("biaodan");
				var username = document.getElementById("username");
//				diaodan.onsubmit = function(){
//					alert('我是表单提交事件');
//				}

//				username.onblur = function(){
//					alert('失去焦点事件');
//				}

//				username.onfocus = function(){
//					alert('获取焦点事件');
//				}

//				username.onchange = function(){
//					alert('内容改变事件');
//				}
			}
		</script>
	</head>
	<body>
		<form action="javascript:;" method="post" id="biaodan">
			用户名：<input type="text" id="username"/>
			<br />
			<input type="submit" value="注册"/>
		</form>
	</body>
</html>
